for a in range(0,21):
    for b in range(0,34):
        for c in range(0,101):
            if a + b + c == 100 and 5 * a + 3 * b + c / 3 == 100:
                print("公鸡有",a,"只,母鸡有",b,"只,雏鸡有",c,"只")